﻿using Microsoft.Xna.Framework;

namespace GameLibrary
{
    /// <summary>
    /// Used to be able to have the Camera class as a service
    /// </summary>
    /// <remarks></remarks>
    public interface ICamera
    {
        /// <summary>
        /// Gets the limit.
        /// </summary>
        /// <remarks></remarks>
        Vector2 Limit { get; }

        /// <summary>
        /// Gets or sets the position.
        /// </summary>
        /// <value>The position.</value>
        /// <remarks></remarks>
        Vector2 Position { get; set; }

        /// <summary>
        /// Gets or sets the origin.
        /// </summary>
        /// <value>The origin.</value>
        /// <remarks></remarks>
        Vector2 Origin { get; set; }

        /// <summary>
        /// Gets or sets the zoom.
        /// </summary>
        /// <value>The zoom.</value>
        /// <remarks></remarks>
        float Zoom { get; set; }

        /// <summary>
        /// Gets or sets the rotation.
        /// </summary>
        /// <value>The rotation.</value>
        /// <remarks></remarks>
        float Rotation { get; set; }

        /// <summary>
        /// Gets the bounding box.
        /// </summary>
        /// <remarks></remarks>
        BoundingBox BoundingBox { get; }

        /// <summary>
        /// Updating the view of the camera by getting all the players positions and
        /// computes the average in which it will keep its center
        /// </summary>
        /// <param name="avgPlayerPositions">The avg player positions.</param>
        /// <param name="parallax">The parallax.</param>
        /// <remarks></remarks>
        void Update(Vector2 avgPlayerPositions, Vector2 parallax);

        /// <summary>
        /// Resets the position.
        /// </summary>
        /// <remarks></remarks>
        void ResetPosition();

        /// <summary>
        /// Gets the view matrix.
        /// </summary>
        /// <returns>The view matrix</returns>
        /// <remarks></remarks>
        Matrix GetViewMatrix();
    }
}